3.1.90 \(\int \frac {(d+e x)^2 (a+b \log (c x^n))^2}{x^4} \, dx\) [90]

Optimal. Leaf size=168 \[ -\frac {2 b^2 d^2 n^2}{27 x^3}-\frac {b^2 d e n^2}{2 x^2}-\frac {2 b^2 e^2 n^2}{x}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {b d e n \left (a+b \log \left (c x^n\right )\right )}{x^2}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {d e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x} \]

[Out]

-2/27*b^2*d^2*n^2/x^3-1/2*b^2*d*e*n^2/x^2-2*b^2*e^2*n^2/x-2/9*b*d^2*n*(a+b*ln(c*x^n))/x^3-b*d*e*n*(a+b*ln(c*x^
n))/x^2-2*b*e^2*n*(a+b*ln(c*x^n))/x-1/3*d^2*(a+b*ln(c*x^n))^2/x^3-d*e*(a+b*ln(c*x^n))^2/x^2-e^2*(a+b*ln(c*x^n)
)^2/x

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2395, 2342, 2341} \begin {gather*} -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {d e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {b d e n \left (a+b \log \left (c x^n\right )\right )}{x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {2 b^2 d^2 n^2}{27 x^3}-\frac {b^2 d e n^2}{2 x^2}-\frac {2 b^2 e^2 n^2}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^4,x]

[Out]

(-2*b^2*d^2*n^2)/(27*x^3) - (b^2*d*e*n^2)/(2*x^2) - (2*b^2*e^2*n^2)/x - (2*b*d^2*n*(a + b*Log[c*x^n]))/(9*x^3)
 - (b*d*e*n*(a + b*Log[c*x^n]))/x^2 - (2*b*e^2*n*(a + b*Log[c*x^n]))/x - (d^2*(a + b*Log[c*x^n])^2)/(3*x^3) -
(d*e*(a + b*Log[c*x^n])^2)/x^2 - (e^2*(a + b*Log[c*x^n])^2)/x

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2395

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rubi steps

\begin {align*} \int \frac {(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx &=\int \left (\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^4}+\frac {2 d e \left (a+b \log \left (c x^n\right )\right )^2}{x^3}+\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x^2}\right ) \, dx\\ &=d^2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx+(2 d e) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx+e^2 \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx\\ &=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {d e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}+\frac {1}{3} \left (2 b d^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{x^4} \, dx+(2 b d e n) \int \frac {a+b \log \left (c x^n\right )}{x^3} \, dx+\left (2 b e^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac {2 b^2 d^2 n^2}{27 x^3}-\frac {b^2 d e n^2}{2 x^2}-\frac {2 b^2 e^2 n^2}{x}-\frac {2 b d^2 n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {b d e n \left (a+b \log \left (c x^n\right )\right )}{x^2}-\frac {2 b e^2 n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {d e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {e^2 \left (a+b \log \left (c x^n\right )\right )^2}{x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 131, normalized size = 0.78 \begin {gather*} -\frac {18 d^2 \left (a+b \log \left (c x^n\right )\right )^2+54 d e x \left (a+b \log \left (c x^n\right )\right )^2+54 e^2 x^2 \left (a+b \log \left (c x^n\right )\right )^2+108 b e^2 n x^2 \left (a+b n+b \log \left (c x^n\right )\right )+27 b d e n x \left (2 a+b n+2 b \log \left (c x^n\right )\right )+4 b d^2 n \left (3 a+b n+3 b \log \left (c x^n\right )\right )}{54 x^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n])^2)/x^4,x]

[Out]

-1/54*(18*d^2*(a + b*Log[c*x^n])^2 + 54*d*e*x*(a + b*Log[c*x^n])^2 + 54*e^2*x^2*(a + b*Log[c*x^n])^2 + 108*b*e
^2*n*x^2*(a + b*n + b*Log[c*x^n]) + 27*b*d*e*n*x*(2*a + b*n + 2*b*Log[c*x^n]) + 4*b*d^2*n*(3*a + b*n + 3*b*Log
[c*x^n]))/x^3

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.20, size = 2473, normalized size = 14.72

method result size
risch \(\text {Expression too large to display}\) \(2473\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))^2/x^4,x,method=_RETURNVERBOSE)

[Out]

-1/3*b^2*(3*e^2*x^2+3*d*e*x+d^2)/x^3*ln(x^n)^2-1/9*(9*I*Pi*b^2*d*e*x*csgn(I*c)*csgn(I*c*x^n)^2-9*I*Pi*b^2*d*e*
x*csgn(I*c*x^n)^3+3*I*Pi*b^2*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2-9*I*Pi*b^2*d*e*x*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x
^n)+18*ln(c)*b^2*e^2*x^2+18*b^2*e^2*n*x^2+18*a*b*e^2*x^2+9*I*Pi*b^2*e^2*x^2*csgn(I*c)*csgn(I*c*x^n)^2+9*I*Pi*b
^2*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-3*I*Pi*b^2*d^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)+9*I*Pi*b^2*e^2*x^2*csg
n(I*x^n)*csgn(I*c*x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2*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2+36*I*Pi*a*b*d^2*csgn(I*c)*csgn(I*c*x^n)^2+36
*I*Pi*a*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2-108*I*Pi*ln(c)*b^2*e^2*x^2*csgn(I*c*x^n)^3-108*I*Pi*a*b*e^2*x^2*csgn
(I*c*x^n)^3+36*I*Pi*ln(c)*b^2*d^2*csgn(I*c)*csgn(I*c*x^n)^2+54*Pi^2*b^2*e^2*x^2*csgn(I*c)*csgn(I*x^n)^2*csgn(I
*c*x^n)^3+216*b*n*x^2*a*e^2-27*Pi^2*b^2*e^2*x^2*csgn(I*c*x^n)^6-108*Pi^2*b^2*e^2*x^2*csgn(I*c)*csgn(I*x^n)*csg
n(I*c*x^n)^4+108*n*ln(c)*b^2*d*e*x+216*ln(c)*a*b*d*e*x)/x^3

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 250, normalized size = 1.49 \begin {gather*} -\frac {2}{27} \, b^{2} d^{2} {\left (\frac {n^{2}}{x^{3}} + \frac {3 \, n \log \left (c x^{n}\right )}{x^{3}}\right )} - \frac {1}{2} \, b^{2} d {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} e - 2 \, b^{2} {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} e^{2} - \frac {b^{2} e^{2} \log \left (c x^{n}\right )^{2}}{x} - \frac {b^{2} d e \log \left (c x^{n}\right )^{2}}{x^{2}} - \frac {2 \, a b n e^{2}}{x} - \frac {a b d n e}{x^{2}} - \frac {2 \, a b e^{2} \log \left (c x^{n}\right )}{x} - \frac {2 \, a b d e \log \left (c x^{n}\right )}{x^{2}} - \frac {b^{2} d^{2} \log \left (c x^{n}\right )^{2}}{3 \, x^{3}} - \frac {2 \, a b d^{2} n}{9 \, x^{3}} - \frac {a^{2} e^{2}}{x} - \frac {a^{2} d e}{x^{2}} - \frac {2 \, a b d^{2} \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {a^{2} d^{2}}{3 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^4,x, algorithm="maxima")

[Out]

-2/27*b^2*d^2*(n^2/x^3 + 3*n*log(c*x^n)/x^3) - 1/2*b^2*d*(n^2/x^2 + 2*n*log(c*x^n)/x^2)*e - 2*b^2*(n^2/x + n*l
og(c*x^n)/x)*e^2 - b^2*e^2*log(c*x^n)^2/x - b^2*d*e*log(c*x^n)^2/x^2 - 2*a*b*n*e^2/x - a*b*d*n*e/x^2 - 2*a*b*e
^2*log(c*x^n)/x - 2*a*b*d*e*log(c*x^n)/x^2 - 1/3*b^2*d^2*log(c*x^n)^2/x^3 - 2/9*a*b*d^2*n/x^3 - a^2*e^2/x - a^
2*d*e/x^2 - 2/3*a*b*d^2*log(c*x^n)/x^3 - 1/3*a^2*d^2/x^3

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 309, normalized size = 1.84 \begin {gather*} -\frac {4 \, b^{2} d^{2} n^{2} + 12 \, a b d^{2} n + 18 \, a^{2} d^{2} + 54 \, {\left (2 \, b^{2} n^{2} + 2 \, a b n + a^{2}\right )} x^{2} e^{2} + 27 \, {\left (b^{2} d n^{2} + 2 \, a b d n + 2 \, a^{2} d\right )} x e + 18 \, {\left (3 \, b^{2} x^{2} e^{2} + 3 \, b^{2} d x e + b^{2} d^{2}\right )} \log \left (c\right )^{2} + 18 \, {\left (3 \, b^{2} n^{2} x^{2} e^{2} + 3 \, b^{2} d n^{2} x e + b^{2} d^{2} n^{2}\right )} \log \left (x\right )^{2} + 6 \, {\left (2 \, b^{2} d^{2} n + 6 \, a b d^{2} + 18 \, {\left (b^{2} n + a b\right )} x^{2} e^{2} + 9 \, {\left (b^{2} d n + 2 \, a b d\right )} x e\right )} \log \left (c\right ) + 6 \, {\left (2 \, b^{2} d^{2} n^{2} + 6 \, a b d^{2} n + 18 \, {\left (b^{2} n^{2} + a b n\right )} x^{2} e^{2} + 9 \, {\left (b^{2} d n^{2} + 2 \, a b d n\right )} x e + 6 \, {\left (3 \, b^{2} n x^{2} e^{2} + 3 \, b^{2} d n x e + b^{2} d^{2} n\right )} \log \left (c\right )\right )} \log \left (x\right )}{54 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^4,x, algorithm="fricas")

[Out]

-1/54*(4*b^2*d^2*n^2 + 12*a*b*d^2*n + 18*a^2*d^2 + 54*(2*b^2*n^2 + 2*a*b*n + a^2)*x^2*e^2 + 27*(b^2*d*n^2 + 2*
a*b*d*n + 2*a^2*d)*x*e + 18*(3*b^2*x^2*e^2 + 3*b^2*d*x*e + b^2*d^2)*log(c)^2 + 18*(3*b^2*n^2*x^2*e^2 + 3*b^2*d
*n^2*x*e + b^2*d^2*n^2)*log(x)^2 + 6*(2*b^2*d^2*n + 6*a*b*d^2 + 18*(b^2*n + a*b)*x^2*e^2 + 9*(b^2*d*n + 2*a*b*
d)*x*e)*log(c) + 6*(2*b^2*d^2*n^2 + 6*a*b*d^2*n + 18*(b^2*n^2 + a*b*n)*x^2*e^2 + 9*(b^2*d*n^2 + 2*a*b*d*n)*x*e
 + 6*(3*b^2*n*x^2*e^2 + 3*b^2*d*n*x*e + b^2*d^2*n)*log(c))*log(x))/x^3

________________________________________________________________________________________

Sympy [A]
time = 0.41, size = 287, normalized size = 1.71 \begin {gather*} - \frac {a^{2} d^{2}}{3 x^{3}} - \frac {a^{2} d e}{x^{2}} - \frac {a^{2} e^{2}}{x} - \frac {2 a b d^{2} n}{9 x^{3}} - \frac {2 a b d^{2} \log {\left (c x^{n} \right )}}{3 x^{3}} - \frac {a b d e n}{x^{2}} - \frac {2 a b d e \log {\left (c x^{n} \right )}}{x^{2}} - \frac {2 a b e^{2} n}{x} - \frac {2 a b e^{2} \log {\left (c x^{n} \right )}}{x} - \frac {2 b^{2} d^{2} n^{2}}{27 x^{3}} - \frac {2 b^{2} d^{2} n \log {\left (c x^{n} \right )}}{9 x^{3}} - \frac {b^{2} d^{2} \log {\left (c x^{n} \right )}^{2}}{3 x^{3}} - \frac {b^{2} d e n^{2}}{2 x^{2}} - \frac {b^{2} d e n \log {\left (c x^{n} \right )}}{x^{2}} - \frac {b^{2} d e \log {\left (c x^{n} \right )}^{2}}{x^{2}} - \frac {2 b^{2} e^{2} n^{2}}{x} - \frac {2 b^{2} e^{2} n \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} e^{2} \log {\left (c x^{n} \right )}^{2}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))**2/x**4,x)

[Out]

-a**2*d**2/(3*x**3) - a**2*d*e/x**2 - a**2*e**2/x - 2*a*b*d**2*n/(9*x**3) - 2*a*b*d**2*log(c*x**n)/(3*x**3) -
a*b*d*e*n/x**2 - 2*a*b*d*e*log(c*x**n)/x**2 - 2*a*b*e**2*n/x - 2*a*b*e**2*log(c*x**n)/x - 2*b**2*d**2*n**2/(27
*x**3) - 2*b**2*d**2*n*log(c*x**n)/(9*x**3) - b**2*d**2*log(c*x**n)**2/(3*x**3) - b**2*d*e*n**2/(2*x**2) - b**
2*d*e*n*log(c*x**n)/x**2 - b**2*d*e*log(c*x**n)**2/x**2 - 2*b**2*e**2*n**2/x - 2*b**2*e**2*n*log(c*x**n)/x - b
**2*e**2*log(c*x**n)**2/x

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 366 vs. \(2 (160) = 320\).
time = 2.62, size = 366, normalized size = 2.18 \begin {gather*} -\frac {54 \, b^{2} n^{2} x^{2} e^{2} \log \left (x\right )^{2} + 54 \, b^{2} d n^{2} x e \log \left (x\right )^{2} + 108 \, b^{2} n^{2} x^{2} e^{2} \log \left (x\right ) + 54 \, b^{2} d n^{2} x e \log \left (x\right ) + 108 \, b^{2} n x^{2} e^{2} \log \left (c\right ) \log \left (x\right ) + 108 \, b^{2} d n x e \log \left (c\right ) \log \left (x\right ) + 18 \, b^{2} d^{2} n^{2} \log \left (x\right )^{2} + 108 \, b^{2} n^{2} x^{2} e^{2} + 27 \, b^{2} d n^{2} x e + 108 \, b^{2} n x^{2} e^{2} \log \left (c\right ) + 54 \, b^{2} d n x e \log \left (c\right ) + 54 \, b^{2} x^{2} e^{2} \log \left (c\right )^{2} + 54 \, b^{2} d x e \log \left (c\right )^{2} + 12 \, b^{2} d^{2} n^{2} \log \left (x\right ) + 108 \, a b n x^{2} e^{2} \log \left (x\right ) + 108 \, a b d n x e \log \left (x\right ) + 36 \, b^{2} d^{2} n \log \left (c\right ) \log \left (x\right ) + 4 \, b^{2} d^{2} n^{2} + 108 \, a b n x^{2} e^{2} + 54 \, a b d n x e + 12 \, b^{2} d^{2} n \log \left (c\right ) + 108 \, a b x^{2} e^{2} \log \left (c\right ) + 108 \, a b d x e \log \left (c\right ) + 18 \, b^{2} d^{2} \log \left (c\right )^{2} + 36 \, a b d^{2} n \log \left (x\right ) + 12 \, a b d^{2} n + 54 \, a^{2} x^{2} e^{2} + 54 \, a^{2} d x e + 36 \, a b d^{2} \log \left (c\right ) + 18 \, a^{2} d^{2}}{54 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))^2/x^4,x, algorithm="giac")

[Out]

-1/54*(54*b^2*n^2*x^2*e^2*log(x)^2 + 54*b^2*d*n^2*x*e*log(x)^2 + 108*b^2*n^2*x^2*e^2*log(x) + 54*b^2*d*n^2*x*e
*log(x) + 108*b^2*n*x^2*e^2*log(c)*log(x) + 108*b^2*d*n*x*e*log(c)*log(x) + 18*b^2*d^2*n^2*log(x)^2 + 108*b^2*
n^2*x^2*e^2 + 27*b^2*d*n^2*x*e + 108*b^2*n*x^2*e^2*log(c) + 54*b^2*d*n*x*e*log(c) + 54*b^2*x^2*e^2*log(c)^2 +
54*b^2*d*x*e*log(c)^2 + 12*b^2*d^2*n^2*log(x) + 108*a*b*n*x^2*e^2*log(x) + 108*a*b*d*n*x*e*log(x) + 36*b^2*d^2
*n*log(c)*log(x) + 4*b^2*d^2*n^2 + 108*a*b*n*x^2*e^2 + 54*a*b*d*n*x*e + 12*b^2*d^2*n*log(c) + 108*a*b*x^2*e^2*
log(c) + 108*a*b*d*x*e*log(c) + 18*b^2*d^2*log(c)^2 + 36*a*b*d^2*n*log(x) + 12*a*b*d^2*n + 54*a^2*x^2*e^2 + 54
*a^2*d*x*e + 36*a*b*d^2*log(c) + 18*a^2*d^2)/x^3

________________________________________________________________________________________

Mupad [B]
time = 3.90, size = 184, normalized size = 1.10 \begin {gather*} -\frac {x\,\left (9\,d\,e\,a^2+9\,d\,e\,a\,b\,n+\frac {9\,d\,e\,b^2\,n^2}{2}\right )+x^2\,\left (9\,a^2\,e^2+18\,a\,b\,e^2\,n+18\,b^2\,e^2\,n^2\right )+3\,a^2\,d^2+\frac {2\,b^2\,d^2\,n^2}{3}+2\,a\,b\,d^2\,n}{9\,x^3}-\frac {{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d^2}{3}+b^2\,d\,e\,x+b^2\,e^2\,x^2\right )}{x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,\left (3\,a+b\,n\right )\,d^2}{3}+3\,b\,\left (2\,a+b\,n\right )\,d\,e\,x+6\,b\,\left (a+b\,n\right )\,e^2\,x^2\right )}{3\,x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*x^n))^2*(d + e*x)^2)/x^4,x)

[Out]

- (x*(9*a^2*d*e + (9*b^2*d*e*n^2)/2 + 9*a*b*d*e*n) + x^2*(9*a^2*e^2 + 18*b^2*e^2*n^2 + 18*a*b*e^2*n) + 3*a^2*d
^2 + (2*b^2*d^2*n^2)/3 + 2*a*b*d^2*n)/(9*x^3) - (log(c*x^n)^2*((b^2*d^2)/3 + b^2*e^2*x^2 + b^2*d*e*x))/x^3 - (
log(c*x^n)*((2*b*d^2*(3*a + b*n))/3 + 6*b*e^2*x^2*(a + b*n) + 3*b*d*e*x*(2*a + b*n)))/(3*x^3)

________________________________________________________________________________________